Add generator runtime planning, bootstrap groundwork, settings documentation, scenario scaffold hooks, and xUnit smoke tests#161
Open
cwinland wants to merge 20 commits into
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces generator-targeted constructor planning and internal bootstrap metadata in FastMoq by adding a public “request → plan” contract on Mocker, layering an internal construction graph and harness-bootstrap descriptor on top of that contract, and wiring MockerTestBase<TComponent> to expose these surfaces for future generator consumption.
Changes:
- Add public construction-planning contract (
InstanceConstructionRequest/InstanceConstructionPlan/InstanceConstructionParameterPlan/InstanceConstructionParameterSource) andMocker.CreateConstructionPlan(...). - Add internal metadata layers (
InstanceConstructionGraph,ComponentHarnessBootstrapDescriptor) plusMockerTestBase<TComponent>accessors. - Add focused runtime tests, update generator roadmap docs, and migrate test assertions from FluentAssertions to AwesomeAssertions.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/roadmap/generator-roadmap.md | Updates roadmap contract notes and records completed #122 groundwork status. |
| docs/roadmap/README.md | Summarizes current status/direction for #125 and #122 in the roadmap index. |
| Directory.Packages.props | Removes FluentAssertions central version entry. |
| FastMoq/packages.lock.json | Updates locked dependency graph (incl. transitive updates). |
| FastMoq.Core/Models/InstanceConstructionRequest.cs | Adds the public request model for constructor-selection intent. |
| FastMoq.Core/Models/InstanceConstructionPlan.cs | Adds the public resolved-plan model + parameter plan + parameter source enum. |
| FastMoq.Core/Models/InstanceConstructionGraph.cs | Adds internal graph node/edge metadata layered over the plan. |
| FastMoq.Core/Models/ComponentHarnessBootstrapDescriptor.cs | Adds internal harness bootstrap descriptor for generator-targeted mapping. |
| FastMoq.Core/Mocker.ConstructionPlan.cs | Implements CreateConstructionPlan(...), plus internal graph creation and request mapping helpers. |
| FastMoq.Core/KnownTypeRegistry.cs | Adds helper predicates to detect known-type managed and parameter resolution. |
| FastMoq.Core/MockerTestBase_Constructors.cs | Exposes planning/graph/bootstrap descriptor accessors on MockerTestBase<TComponent>. |
| FastMoq.Tests/InstanceConstructionPlanTests.cs | Adds tests covering plan output across multiple resolution categories. |
| FastMoq.Tests/InstanceConstructionGraphTests.cs | Adds tests for internal graph projection and harness hook mapping. |
| FastMoq.Tests/MockerTestBaseConstructionPlanTests.cs | Adds tests for MockerTestBase<TComponent> planning and bootstrap descriptor behavior. |
| FastMoq.Tests/GlobalUsings.cs | Switches assertions global usings to AwesomeAssertions. |
| FastMoq.Tests/FastMoq.Tests.csproj | Replaces FluentAssertions with AwesomeAssertions package reference. |
| FastMoq.Tests.Web/GlobalUsings.cs | Switches assertions global usings to AwesomeAssertions in web test project. |
| FastMoq.Tests/InternalSampleServiceTests.cs | Removes now-unneeded FluentAssertions using. |
7 tasks
14 tasks
10 tasks
* Document generated-test settings design for #162 * Fix generated harness parameterless constructor selection * Define #126 scenario scaffolding contract * Document #134 helper-family narrowing matrix * Align generator project GUID across solutions * Add generated shared setup scenario scaffold hooks (#164) * Expand generated scenario scaffold executors * Add generated shared setup scaffold hooks * Strengthen generated shared setup hook ordering test * Document generated scenario scaffold members * docs: align generator roadmap with current scope * Widen generated harness smoke test coverage (#165) * Widen generated harness smoke test coverage * Fix: Escape C# keywords in generated method invocations When component methods are named with C# keywords (e.g., @Class, @return), the unescaped IMethodSymbol.Name resulted in invalid emitted code like 'component.class()' instead of 'component.@Class()'. - Add EscapeIdentifierIfKeyword helper using SyntaxFacts.GetKeywordKind - Apply escaping in CreateGeneratedTestMethodModel to all method references - Add [Fact] test covering keyword methods (@Class, @interface, @return) Addresses code review comment on GeneratedHarnessSourceGenerator.cs * feat(generators): wire FastMoqGeneratedTestFramework MSBuild property into generator pipeline (#123 slice 2) (#166) Wire FastMoqGeneratedTestFramework MSBuild property into generator pipeline - Add CompilerVisibleProperty for FastMoqGeneratedTestFramework to generator csproj - Read build_property.FastMoqGeneratedTestFramework in incremental pipeline via AnalyzerConfigOptionsProvider - Combine frameworkSetting with targets pipeline; pass to EmitSource - When value is 'none' (case-insensitive), suppress xUnit smoke-test emission regardless of metadata - Add TestAnalyzerConfigOptionsProvider / TestAnalyzerConfigOptions nested helpers for test isolation - Add 3 new [Fact] tests covering none suppression, explicit xunit enable, and case-insensitive none Part of #123
Comment on lines
+422
to
+427
| case float floatValue: | ||
| expression = floatValue.ToString("R", CultureInfo.InvariantCulture) + "F"; | ||
| return true; | ||
| case double doubleValue: | ||
| expression = doubleValue.ToString("R", CultureInfo.InvariantCulture); | ||
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates v5 generator foundation work including constructor planning, harness bootstrap metadata, generated-test settings model, scenario scaffold integration, and initial xUnit smoke-test emission.
Core Foundation (from #161)
Settings & Documentation (from merged #163)
Scenario Scaffold Integration (from merged #164)
xUnit Smoke Tests (from merged #165)
Framework Property Bridge (from merged #166)
Validation
Tracking
"@; = @{ title = Add generator runtime planning, bootstrap groundwork, settings documentation, scenario scaffold hooks, and xUnit smoke tests; body = } | ConvertTo-Json; = Invoke-RestMethod -Uri "https://api.github.com/repos/cwinland/FastMoq/pulls/161" -Method Patch -Headers System.Collections.Hashtable -Body ; "PR Add generator runtime planning, bootstrap groundwork, settings documentation, scenario scaffold hooks, and xUnit smoke tests #161 updated:
Title: "